# Maintainer: Sven-Hendrik Haase
pkgname=vkmark
pkgdesc='Vulkan benchmark'
pkgver=20220318
pkgrel=1
url='https://github.com/vkmark/vkmark'
arch=('loong64' 'x86_64')
license=('LGPL')
depends=('vulkan-icd-loader' 'assimp')
makedepends=('git' 'vulkan-headers' 'meson' 'ninja' 'wayland-protocols' 'glm' 'xcb-util-wm'
             'xorgproto' 'wayland')
optdepends=('xcb-util-wm: for X11 support'
            'wayland: for Wayland support')
source=(git+https://github.com/vkmark/vkmark.git#commit=cf45f2f
        $pkgname-38.patch::https://patch-diff.githubusercontent.com/raw/vkmark/vkmark/pull/38.patch)
sha1sums=('SKIP'
          'f189da9cccaff8526ee1a9f03388be333d1fa434')

prepare() {
  cd vkmark
  patch -Np1 -i "${srcdir}"/$pkgname-38.patch
}

build() {
  cd vkmark
  meson --prefix=/usr build
  ninja -C build
}

package() {
  cd vkmark
  DESTDIR="$pkgdir" ninja -C build install
}

